package com.ay.weixin.fdc.admin.customer.db;

import java.sql.SQLException;

import lizar.db.ibatis.Dao;

import com.ay.weixin.fdc.admin.customer.domain.Customer;

public class IbatisCustomerDao extends Dao{

	
	public void insert(Customer cus) throws SQLException{
		this.sqlMapper.insert("customer.insert",cus);
	}
	
	public boolean name_exists(String name) throws SQLException{
		
		return this.sqlMapper.queryForObject("customer.name_exists",name)!=null;
	}
	
	public Customer get(String name) throws SQLException{
		return (Customer)this.sqlMapper.queryForObject("customer.get",name);
	}
}
